USE [Biblioteca]
GO

/****** Object:  StoredProcedure [dbo].[sp_ValidarUsuario]    Script Date: 09/01/2012 10:50:36 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
Create PROCEDURE [dbo].[sp_ValidarUsuario]

@Usuario nvarchar(50) , 
@Password nvarchar(50),
@tiene_acceso bit OUTPUT

AS
if (SELECT Top 1 nombre From Socio WHERE nomUsuario = @Usuario
and password = @Password) is null
set @tiene_acceso = 0
else
set @tiene_acceso = 1

GO


